import request from '@/utils/request'

// 查询租约管理列表
export function listDealLease(query) {
  return request({
    url: '/lease/dealLease/list',
    method: 'get',
    params: query
  })
}

// 查询租约管理报表
export function reportListDealLease(query) {
  return request({
    url: '/lease/dealLease/reportList',
    method: 'get',
    params: query
  })
}

// 查询租约管理详细
export function getDealLease(id) {
  return request({
    url: '/lease/dealLease/' + id,
    method: 'get'
  })
}

// 保存租约管理
export function saveDealLease(data) {
  return request({
    url: '/lease/dealLease/save',
    method: 'post',
    data: data
  })
}

// 删除租约管理
export function delDealLease(id) {
  return request({
    url: '/lease/dealLease/' + id,
    method: 'delete'
  })
}

// 导出租约管理
export function exportDealLease(query) {
  return request({
    url: '/lease/dealLease/export',
    method: 'get',
    params: query
  })
}

// 删除租金明细
export function delDealLeaseRent(id) {
  return request({
    url: '/rent/dealLeaseRent/' + id,
    method: 'delete'
  })
}

export function deleteSuspend(leaseId) {
  return request({
    url: '/lease/dealLease/deleteSuspend/' + leaseId,
    method: 'delete'
  })
}

// 查询房号下拉
export function findSelect(query) {
  return request({
    url: '/license/dealLicenseDetails/findSelect',
    method: 'get',
    params: query
  })
}

// 查询租金管理列表
export function findListByDealId(query) {
  return request({
    url: '/rent/dealLeaseRent/findListByDealId',
    method: 'get',
    params: query
  })
}

// 查询租金管理详细
export function getDealLeaseRent(id) {
  return request({
    url: '/rent/dealLeaseRent/' + id,
    method: 'get'
  })
}

export function saveDealLeaseRent(data) {
  return request({
    url: '/rent/dealLeaseRent/save',
    method: 'post',
    data: data
  })
}
